﻿Public Class Form11

    Private Sub ButtonX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX2.Click
        Form13.Show()

    End Sub

    Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
        If TextBox1.Text = "E464-85G5-48N3-R215" Then
            MsgBox("Correct Key", MsgBoxStyle.Information)
            My.Settings.Entered = "true"
            My.Settings.Save()
            My.Settings.Reload()
            Me.Close()

        Else
            MsgBox("Wrong Key", MsgBoxStyle.Critical)
        End If
    End Sub

    Private Sub Form11_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Settings.Entered = "true" Then
            Form1.Show()
            Me.Close()
        End If
    End Sub
End Class